import { settings, changeSetting } from "../settings";

const SettingCheck = ({ area, prop, desp }) => (
  <label class="label my-1 block text-xs/6">
    <input
      type="checkbox"
      name={area + prop}
      checked={settings.value[area][prop]}
      onChange={(event) => {
        changeSetting(area, prop, event.target.checked);
      }}
      class="toggle mx-1"
    />
    {desp}
  </label>
);

export default SettingCheck;
